//
//  MyTableViewCell.m
//  BaseFrame
//
//  Created by 孟学浩 on 2017/4/1.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "MyTableViewCell.h"

@interface MyTableViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;

@end

@implementation MyTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = 0;
    self.separatorInset = UIEdgeInsetsZero;
    if ([self respondsToSelector:@selector(setLayoutMargins:)]) {
        self.layoutMargins = UIEdgeInsetsZero;
    }
}

- (void)setImgView:(UIImageView *)imgView{
    _imgView = imgView;
    imgView.contentMode = UIViewContentModeScaleAspectFit;
}

- (void)setDataDictionary:(NSDictionary *)dataDictionary{
    _dataDictionary = dataDictionary;
    _imgView.image = [UIImage imageNamed:_dataDictionary[@"img"]];
    _infoLabel.text = _dataDictionary[@"title"];
    self.accessoryType = [_dataDictionary[@"flag"] integerValue];
}

@end
